<template>
    <div class="content"  @click="carDetail(demo.pId)">
        <image class="content_img" v-if="demo.headImg" :src="demo.headImg"></image>
        <image class="content_img" v-else src="bmlocal://assets/acw/car.jpg"></image>
        <div>
            <text class="content_first">{{demo.pAllname}}</text>
            <div class="content_third">
                <text class="content_third_price">{{demo.pPrice+"万元"}}</text>
                <text class="content_third_price">{{"首付："+Math.ceil((demo.pPrice)*0.07)+"万元"}}</text>  <!--首付款7%-->
            </div>
            <div class="content_two">
                <text class="content_two1">{{demo.pYear}}年</text>
                <text class="content_two2">{{demo.pKilometre}}万公里</text>
                <text class="content_two1">{{demo.p1}}</text>
            </div>
            <div class="content_four">
                <text class="content_four_text" v-if="demo.selltype!= 1 ">3天无理由</text>
                <text class="content_four_text">{{demo.selltype!= 1 ? '2万公里质保': '可领取2万公里质保'}}</text>
                <text class="content_four_text" @click="callPhone(demo.pTel)">{{demo.selltype != 1 ? '联系商家': '联系车主'}}</text>
            </div>
        </div>
    </div>
</template>
<script>
    export default {
        props: ["demo"],
        data () {
            return {
                
            }
        },
        created () {
            
            
        },
        methods: {
            carDetail (id) {
                this.$router.open({
                    name: 'acw.buycar.cardetail',
                    type: 'PUSH',
                    params: {carId: id}
                });
            },
        }
    }
</script>
<style>
.iconfont {
    font-family: iconfont;
}

.content{
    flex-direction: row;
    height: 280px;
    border-bottom-width:1px;
    border-color: #e0e0e0;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}
.content_first{
    width: 500px;
    color: #666;
    font-size: 30px;
    margin-bottom: 10px;
}
.content_img{
    height: 200px;
    width: 240px;
    margin-right: 10px;
}
.content_two{
    flex-direction: row;
    margin-top: 20px;
    margin-bottom: 20px;
}
.content_third{
    flex-direction: row;
}
.content_two1{
    color: #666;
    font-size: 30px;
    padding-left: 20px;
    padding-right: 20px;
}
.content_two2{
    color: #666;
    font-size: 30px;
    padding-left: 20px;
    padding-right: 20px;
    border-left-style: solid;
    border-left-width: 2px;
    border-left-color: #666;
    border-right-style: solid;
    border-right-width: 2px;
    border-right-color: #666;
}
.content_third_price{
    font-size: 30px;
    color: #f2061a;
    margin-left: 20px;
    margin-right: 40px;
}
.content_four{
    /*width: 520px;*/
    flex-direction: row;
    justify-content: space-around;
    padding-top: 5px;
    padding-right: 5px;

}
.content_four_text{
    font-size: 25px;
    color: #666;
    border-style: solid;
    border-width: 1px;
    border-color: #666;
    border-radius: 5px;
    height: 40px;
    line-height: 40px;
    padding-left: 10px;
    padding-right: 10px;
    margin-left: 5px;
    margin-right: 5px;
}
</style>
